%{
	#include<stdio.h>
	#include<stdlib.h>
	#include<math.h>
	void ifinstead();
	void floatinsert();
	double mark[1000]={0};
	int num=0;
	int norepeat=0;
%}

%%

^[0-9]+				{	ifinstead();		}
"NAME"$				{	printf("XZ");		}
([0-9]+\.[0-9]+)|([0-9]+)	{	floatinsert();		}
[A-Za-z\x21-\x2f\x3a-\x7f]+	{	printf("%s",yytext);	}

%%

void ifinstead(){
	int i=0;
	double d;
	if(yyleng==9){
		printf("201492391");
	}
	else{
		num++;
		d=atof(yytext);
		printf("%lld",(long long int)(d*2+201492391));
		while(i<norepeat&&d!=mark[i]){i++;}
		if(d!=mark[i])
			mark[norepeat++]=d;
	}
}

void floatinsert(){
	int i=0;
	double d;
	num++;
	d=atof(yytext);
	while(i<norepeat&&d!=mark[i]){i++;}
	if(d!=mark[i])
		mark[norepeat++]=d;
	d=d*2+201492391.0;
	if((d-floor(d))>0.5)
		printf("%d",(int)(ceil(d)));
	else
		printf("%d",(int)(floor(d)));
}

int main(){
	yylex();
	printf("\n出现次数: %d\t去重次数: %d",num,norepeat);
	return 0;

}
